package com.supercube.sport.yoga.dao;

import com.supercube.sport.yoga.bo.ClassSingedBo;
import com.supercube.sport.yoga.bo.MemberSignedBo;
import com.supercube.sport.yoga.domain.BookingCourseDTO;
import com.supercube.sport.yoga.domain.ClassInfoDTO;
import com.supercube.sport.yoga.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface BookingCourseMapper {
    int deleteByPrimaryKey(String id);

    int insert(BookingCourseDTO record);

    int insertSelective(BookingCourseDTO record);

    BookingCourseVO selectByPrimaryKey(String id);

    List<BookingCourseBo> getBookingCourse(String memberId);

    int updateByPrimaryKeySelective(BookingCourseDTO record);

    int updateByPrimaryKey(BookingCourseDTO record);

    List<MemberBookingCourseInfoVO> selectBookingCourseByClassTableId(String classTableId);

    /**
     * 是否已经预约过了
     *
     * @param classId 课程ID
     * @param memberId 会员ID
     * @return
     */
    Integer isAlreadyAppointment(@Param("classId") String classId, @Param("memberId") String memberId);

    List<SignedRecordVo> getSignedRecord(SignedRecordVo vo);

    List<Map<String,String>> queryVenue(@Param("userId")Long userId,@Param("memberId")String memberId);

    List<MemberCardBindVo> getMemberCardAppointment(Map<String,String> map);
    List<MemberCardBindVo> getMemberCard(Map<String,String> map);
    List<CourseBasicInfoVO> getCourseBaseInfo(Map<String,String> map);
    List<ClassInfoVo> getClassInfo(ClassSingedBo bo);

    ClassInfoDTO queryBookingCourse(MemberSignedBo bo);

    List<BookingCourseVO> selectBookingCourseBySiteId(String siteId, String classId);

    List<MemberAndCardVo> selectMemberAndCard();

    Long hasRightsToAppointment(@Param("curriculumId") String curriculumId, @Param("memberId") String memberId);

    int countBookingCourseInfoByClassId(String classId);
}